<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateSystemAccountsTable extends Migration
{
    /**
     * Run the migrations.
     */
    public function up()
    {
        Schema::create('system_accounts', function (Blueprint $table) {
            $table->increments('id');
            $table->tinyInteger('account_type')->comment('类型：1-充币账户,2-提币账户，3-交易手续费账户，4-提现手续费账户，5-活动赠送账户,6-系统充值账户');
            $table->integer('coin_id')->comment('币种id');
            $table->decimal('number', 20, 8)->default(0)->comment('余额');
            $table->bigInteger('version')->default(0)->comment('版本号');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down()
    {
        Schema::dropIfExists('system_accounts');
    }
}
